package com.sais.manage.boot.platform.controller;

import com.sais.common.entity.Result;
import com.sais.manage.boot.platform.annotation.Throttle;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Properties;

/**
 * 宿舍管理系统-部署信息
 *
 * @author zhang
 * @date 2019/11/30
 **/
@Api(tags = "部署信息")
@Slf4j
@CrossOrigin
@RestController
@RequestMapping("/api/platform/deploy")
public class DeployInfoController {

    @ApiOperation("部署 信息")
    @Throttle
    @RequestMapping(value = "/info", method = RequestMethod.GET)
    public Result saveUser() {
        Properties properties = System.getProperties();
        return Result.response().data("properties", properties);
    }

}
